import wx

from config import Version, Config
from utils.constants import LOGO_PATH
from .home import Home


def run():
    # screen_width, screen_height = wx.DisplaySize()
    # width = int(screen_width / 6.2)
    # height = int(screen_height / 2)

    width = 360
    height = 670

    icon = wx.Icon(LOGO_PATH, wx.BITMAP_TYPE_ICO)
    Home(title='SharingNet', size=(width, height), icon=icon)

    announcement = Config().inform
    if announcement is not None:
        wx.MessageBox(announcement, "公告", wx.OK | wx.ICON_INFORMATION)